{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4be671ee",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_deepseek import ChatDeepSeek\n",
    "\n",
    "llm = ChatDeepSeek(model=\"deepseek-chat\", temperature=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60ae017b",
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import Optional\n",
    "from pydantic import Field\n",
    "from pydantic.v1 import BaseModel\n",
    "# 定义一个数据模型\n",
    "\n",
    "class Person(BaseModel):\n",
    "    \"\"\"\n",
    "    关于一个人的数据模型\n",
    "    \"\"\"\n",
    "    name: Optional[str] = Field(default=None, description=\"姓名\")\n",
    "    age: int\n",
    "    gender: str\n",
    "    department: str\n",
    "    salary: float"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "langchain_learn",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3.10.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
